if (FALSE) {
library(EMCluster, quietly = TRUE)
set.seed(1234)
### Iris.
x <- as.matrix(iris[, 1:4])
ret <- init.EM(x, nclass = 3, min.n = 30)
ret.proj <- project.on.2d(x, ret)
### Plot.
pdf("iris_ppcontour.pdf", height = 5, width = 5)
plotppcontour(ret.proj$da, ret.proj$Pi, ret.proj$Mu, ret.proj$S,
ret.proj$class, main = "Iris K = 3")
dev.off()
}
Run the code above in your browser using DataLab